<?php

class Core_Model_Permission_Group extends Dcmp_Model_Entity {

    public function __construct() {
        parent::__construct();
    }

//    public function validate() {
//        if ($this->isNew()) {
//            if ($this->getTable()->checkExists(array('code' => $this->getCode(), 'area_id' => $this->getAreaId()))) {
//                return array(sprintf(Kd_Localize_Helper::__f('permission.message.repeated'), '{permission.label.role}', $this->getCode()));
//            }
//        }
//        return TRUE;
//    }

    protected function initializeTable($table) {
        $table->setName('{t}permission_group');
        $table->createColumn('id', 'integer', TRUE, TRUE);
        $table->createColumn('code')->setUpdateable(FALSE);
        $table->createColumn('name', 'string');
        $table->createColumn('area_id', 'string');
    }

}